{%- import "macros.html" as macros -%}

                <div class="spacer"></div>
                {# The global alert, if there is one #}
                {% include "header/global_alert.html" -%}

                <ul class="pure-menu-list">
                    {#
                    The docs.rs dropdown menu
                    #}<li class="pure-menu-item pure-menu-has-children">
                        <a href="#" class="pure-menu-link" aria-label="docs.rs">docs.rs</a>
                        <ul class="pure-menu-children aligned-icons">
                            {%- call macros::menu_link_with_icon_solid(
                                href="/about",
                                text="About docs.rs",
                                icon=crate::icons::IconCircleInfo,
                            ) -%}
                            {%- call macros::menu_link_with_icon_brand(
                                href="/about/badges",
                                text="Badges",
                                icon=crate::icons::IconFonticons,
                            ) -%}
                            {%- call macros::menu_link_with_icon_solid(
                                href="/about/builds",
                                text="Builds",
                                icon=crate::icons::IconGears,
                            ) -%}
                            {%- call macros::menu_link_with_icon_solid(
                                href="/about/metadata",
                                text="Metadata",
                                icon=crate::icons::IconTable,
                            ) -%}
                            {%- call macros::menu_link_with_icon_solid(
                                href="/about/redirections",
                                text="Shorthand URLs",
                                icon=crate::icons::IconRoad,
                            ) -%}
                            {%- call macros::menu_link_with_icon_solid(
                                href="/about/download",
                                text="Download",
                                icon=crate::icons::IconDownload,
                            ) -%}
                            {%- call macros::menu_link_with_icon_solid(
                                href="/about/rustdoc-json",
                                text="Rustdoc JSON",
                                icon=crate::icons::IconFileCode,
                            ) -%}
                            {%- call macros::menu_link_with_icon_solid(
                                href="/releases/queue",
                                text="Build queue",
                                icon=crate::icons::IconGears,
                            ) -%}
                            {%- call macros::menu_link_with_icon_solid(
                                href="https://foundation.rust-lang.org/policies/privacy-policy/#docs.rs",
                                text="Privacy policy",
                                icon=crate::icons::IconShieldHalved,
                                target="_blank",
                            ) -%}
                        </ul>
                    </li>
                </ul>
                <ul class="pure-menu-list">{#
                    The Rust dropdown menu
                    #}<li class="pure-menu-item pure-menu-has-children">
                        <a href="#" class="pure-menu-link" aria-label="Rust">Rust</a>
                        <ul class="pure-menu-children">
                            {% call macros::menu_link(
                                href="https://www.rust-lang.org/",
                                text="Rust website",
                                target="_blank"
                            ) %}
                            {% call macros::menu_link(
                                href="https://doc.rust-lang.org/book/",
                                text="The Book",
                                target="_blank"
                            ) %}

                            {% call macros::menu_link(
                                href="https://doc.rust-lang.org/std/",
                                text="Standard Library API Reference",
                                target="_blank"
                            ) %}

                            {% call macros::menu_link(
                                href="https://doc.rust-lang.org/rust-by-example/",
                                text="Rust by Example",
                                target="_blank"
                            ) %}

                            {% call macros::menu_link(
                                href="https://doc.rust-lang.org/cargo/guide/",
                                text="The Cargo Guide",
                                target="_blank"
                            ) %}

                            {% call macros::menu_link(
                                href="https://doc.rust-lang.org/nightly/clippy",
                                text="Clippy Documentation",
                                target="_blank"
                            ) %}
                        </ul>
                    </li>
                </ul>
                {# The search bar #}
                <div id="search-input-nav">
                    <label for="nav-search">
                        {{ crate::icons::IconMagnifyingGlass.render_solid(false, false, "") }}
                    </label>

                    {# If there is a search query, put it in the search bar #}
                    {# The tabindex="-1" is used to prevent it to be the first input focused on the page when using the browser shortcut #}
                    <input id="nav-search" name="query" type="text" aria-label="Find crate by search query" tabindex="-1"
                        placeholder="Find crate"
                        {% if search_query is defined %}
                            {%- if let Some(query) = search_query %}
                                {%- if !query.is_empty() +%}
                                    value="{{ query }}"
                                {%- endif %}
                            {%- endif %}
                        {%- endif %}>
                </div>
            </form>
        </div>
    </div>
</div>
